<!DOCTYPE html>
<html lang="en" class="svg no-js">
<head>
    <meta charset="utf-8" />
    <!--[if IE ]>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <![endif]-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="Language" content="en">

    <title>MySQL :: MySQL 8.0 Reference Manual :: A.5 MySQL 8.0 FAQ: Triggers</title>
    <link rel="stylesheet" media="all" href="css/main-20190125.min.css" />
            <link rel="stylesheet" media="all" href="css/docs-20190125.min.css" />
    
    
    <link rel="stylesheet" media="print" href="css/print-20190125.min.css" />

    
    
    
    
            <link rel="contents" href="index.html" title="MySQL 8.0 Reference Manual" />
<link rel="start" href="index.html" title="MySQL 8.0 Reference Manual" />
<link rel="prev" href="faqs-stored-procs.html" title="A.4 MySQL 8.0 FAQ: Stored Procedures and Functions" />
<link rel="next" href="faqs-views.html?ff=nopfpls" title="A.6 MySQL 8.0 FAQ: Views" />
<link rel="up" href="faqs.html" title="A MySQL 8.0 Frequently Asked Questions" />

    
    <link rel="shortcut icon" href="favicon.ico" />
    <script>(function(H){ H.className=H.className.replace(/\bno-js\b/,'js') })(document.documentElement)</script>
    <script src="js/site-20181120.min.js"></script>

    
    
    
    <!--[if lt IE 9]>
        <script src="https://labs.mysql.com/common/js/polyfills/html5shiv-printshiv-3.7.2.min.js"></script>
        <script src="https://labs.mysql.com/common/js/polyfills/respond-1.4.2.min.js"></script>
    <![endif]-->
        <!--[if IE 9]>
        <style>#docs-sidebar-toc { box-sizing: content-box; }</style>
    <![endif]-->
    </head>

<body class="no-sidebar full-page dev">
<div class="page-wrapper">
    <header>

                        <a href="https://dev.mysql.com/" aria-label="Home" title="MySQL" id="l1-home-link"></a>
        
        <div id="l1-nav-container">
            <div id="l1-line1">
                <div id="l1-auth-links">
                    <a href="https://www.mysql.com/about/contact/"><b>Contact MySQL</b></a>
                    <span id="l1-contact-separator">&nbsp;|&nbsp;</span>
                    <span id="l1-contact-separator-br"><br /></span>
                                             <a href="https://dev.mysql.com/auth/login/?dest=https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F8.0%2Fen%2Ffaqs-triggers.html">Login</a> &nbsp;|&nbsp;
                         <a href="https://dev.mysql.com/auth/register/">Register</a>
                                    </div>
                <div id="l1-lhs">
                    <div id="l1-slogan">
                        The world's most popular open source database
                    </div>
                    <div id="l1-search-box">
                        <form id="l1-search-form" method="get" action="https://www.oracle.com/search/results">
                        <input type="hidden" name="cat" value="mysql" />
                        <input type="hidden" name="Ntk" value="SI-ALL5" />
                        <input id="l1-search-input" type="search" class="icon-search" placeholder="Search" aria-label="Search" name="Ntt" />
                        </form>
                    </div>
                </div>
            </div>
            <div id="l1-line2">
                <div class="social-icons">
                    <a aria-label="Join us on Facebook" title="Join us on Facebook" href="http://www.facebook.com/mysql"><span class="icon-facebook"></span></a>
                    <a aria-label="Follow us on Twitter" title="Follow us on Twitter" href="https://twitter.com/mysql"><span class="icon-twitter"></span></a>
                    <a aria-label="Follow us on LinkedIn" title="Follow us on LinkedIn" href="https://www.linkedin.com/company/mysql"><span class="icon-linkedin"></span></a>
                    <a aria-label="Visit our YouTube channel" title="Visit our YouTube channel" href="http://www.youtube.com/mysqlchannel"><span class="icon-youtube"></span></a>
                </div>
                <ul id="l1-nav">
                    <li>
                        <a href="https://www.mysql.com/"><!-- <span class="icon-sakila"></span>  -->MySQL.com</a>
                    </li><li>
                        <a href="https://www.mysql.com/downloads/"><!-- <span class="icon-download-thin"></span>  -->Downloads</a>
                    </li><li class="active">
                        <a href="/doc/"><!-- <span class="icon-books"></span>  -->Documentation</a>
                    </li><li>
                        <a href="/"><!-- <span class="icon-code"></span>  -->Developer Zone</a>
                    </li>                </ul>
            </div>
        </div>
        <div id="sub-header">
            <div id="l2-nav-container">
                <div id="l2-nav-toggle">
                    <span class="icon-three-bars"></span>
                </div>
                                                                                        <a class="button nav-button-3" href="/"><span class="icon-code"></span> Developer Zone</a>
                                                                                                                                    <a class="button nav-button-2" href="https://www.mysql.com/downloads/"><span class="icon-download-thin"></span> Downloads</a>
                                                                                                <a class="button nav-button-1" href="https://www.mysql.com/"><span class="icon-sakila"></span> MySQL.com</a>
                                                                        <div id="l2-search-toggle">
                    <span class="icon-search"></span>
                </div>
                <div id="l2-site-icon">
                                                                                                                                                                                                    <span class="icon-books"></span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </div>
                <div id="l1-section-title">
                    <span id="l1-section-label">
                        <a href="/doc/">Documentation</a>
                    </span>
                </div>
                <nav>
                    

<ul id="l2-nav">
            	<li class="active"><a class="active " href="/doc/refman/en/">MySQL Server</a>
    			</li>
	        	<li class=""><a  href="/doc/index-enterprise.html">MySQL Enterprise</a>
    			</li>
	        	<li class=""><a  href="/doc/workbench/en/">Workbench</a>
    			</li>
	        	<li class=""><a  href="/doc/en/mysql-innodb-cluster-userguide.html">InnoDB Cluster</a>
    			</li>
	        	<li class=""><a  href="/doc/index-cluster.html">MySQL NDB Cluster</a>
    			</li>
	        	<li class=""><a  href="/doc/index-connectors.html">Connectors</a>
    			</li>
	        	<li class=" last"><a  href="/doc/index-other.html">More</a>
    			</li>
	                        <li class="other-section"><a href="https://www.mysql.com/">MySQL.com</a></li>
                            <li class="other-section"><a href="https://www.mysql.com/downloads/">Downloads</a></li>
                                        <li class="other-section"><a href="/">Developer Zone</a></li>
            </ul>
                </nav>
            </div>
            <div id="l3-search-container"></div>
            <div id="top-orange"><span id="section-nav">Section Menu: &nbsp; </span></div>
        </div>
    </header>
        <div id="page">
                        <div role="main" id="main">

            
                
            
<div>
    <div id="docs-sidebar-toc" class="">
    <div id="docs-toc-inner">
        <div class="docs-sidebar-header" id="docs-nav-header">
            <a class="docs-show-hide-nav" id="docs-hide-nav" href="" title="Hide Sidebar" aria-label="Hide Sidebar"><span class="icon-arrow-small-left"></span></a>
            <div class="docs-nav-links">
                                    
    <a href="faqs-stored-procs.html"
        aria-label="Previous" title="Previous: MySQL 8.0 FAQ: Stored Procedures and Functions"><span
        class="icon-chevron-left"></span></a>
<a href="index.html" aria-label="Start" title="Start"><span class="icon-book-open"></span></a>
        <a aria-label="Up" href="faqs.html" title="Up: MySQL 8.0 Frequently Asked Questions"><span class="icon-chevron-up"></span></a>
    <a href="faqs-views.html" aria-label="Next"
        title="Next: MySQL 8.0 FAQ: Views"><span
        class="icon-chevron-right"></span></a>
                            </div>
        </div>
                    
<div id="docs-sidebar-search-container">
    <div id="docs-sidebar-search-box">
        <form method="get" action="/mysql-manual/search-page">
            <input type="hidden" name="d" id="d" value="201" />
            <input type="hidden" name="p" id="p" value="1" />
            <input type="text" name="keyword" id="q" title="Search this Manual"
                value=""
                style="color: #bbb;"
                onfocus=""
                onblur="" />

            <button class="docs-sidebar-search-btn" aria-label="Search" title="Search" type="submit">
                <span class="icon-search"></span>
            </button>
        </form>
    </div>
</div>
                <div class="docs-sidebar-nav">
            <a class="docs-icon-home" href="/doc/"><span class="icon-home"></span>Documentation Home</a><hr />
            <div class="docs-sidebar-mtitle">MySQL 8.0 Reference Manual</div>
            <nav class="doctoc" id="doc-201">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="preface.html">Preface and Legal Notices</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="introduction.html">General Information</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="installing.html">Installing and Upgrading MySQL</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="tutorial.html">Tutorial</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs.html">MySQL Programs</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="server-administration.html">MySQL Server Administration</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="security.html">Security</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="backup-and-recovery.html">Backup and Recovery</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="optimization.html">Optimization</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="language-structure.html">Language Structure</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="charset.html">Character Sets, Collations, Unicode</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="data-types.html">Data Types</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="functions.html">Functions and Operators</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax.html">SQL Statement Syntax</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="data-dictionary.html">MySQL Data Dictionary</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="innodb-storage-engine.html">The InnoDB Storage Engine</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="storage-engines.html">Alternative Storage Engines</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="replication.html">Replication</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="group-replication.html">Group Replication</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-shell-userguide.html">MySQL Shell</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="document-store.html">Using MySQL as a Document Store</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-innodb-cluster-userguide.html">InnoDB Cluster</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-cluster.html">MySQL NDB Cluster 8.0</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="partitioning.html">Partitioning</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="stored-objects.html">Stored Objects</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="information-schema.html">INFORMATION_SCHEMA Tables</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="performance-schema.html">MySQL Performance Schema</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sys-schema.html">MySQL sys Schema</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="connectors-apis.html">Connectors and APIs</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="extending-mysql.html">Extending MySQL</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-enterprise.html">MySQL Enterprise Edition</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="workbench.html">MySQL Workbench</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-down"></span></a></div><div class="docs-sidebar-nav-link"><a href="faqs.html">MySQL 8.0 Frequently Asked Questions</a></div></div>                        <div class="docs-submenu">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-general.html">MySQL 8.0 FAQ: General</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-storage-engines.html">MySQL 8.0 FAQ: Storage Engines</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-sql-modes.html">MySQL 8.0 FAQ: Server SQL Mode</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-stored-procs.html">MySQL 8.0 FAQ: Stored Procedures and Functions</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link current"><a href="faqs-triggers.html">MySQL 8.0 FAQ: Triggers</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-views.html">MySQL 8.0 FAQ: Views</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-information-schema.html">MySQL 8.0 FAQ: INFORMATION_SCHEMA</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-migration.html">MySQL 8.0 FAQ: Migration</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-security.html">MySQL 8.0 FAQ: Security</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-mysql-cluster.html">MySQL 8.0 FAQ: NDB Cluster</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-cjk.html">MySQL 8.0 FAQ: MySQL Chinese, Japanese, and Korean
Character Sets</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-connectors-apis.html">MySQL 8.0 FAQ: Connectors &amp; APIs</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-replication.html">MySQL 8.0 FAQ: Replication</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-thread-pool.html">MySQL 8.0 FAQ: MySQL Enterprise Thread Pool</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-innodb-change-buffer.html">MySQL 8.0 FAQ: InnoDB Change Buffer</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-tablespace-encryption.html">MySQL 8.0 FAQ: InnoDB Data-at-Rest Encryption</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="faqs-virtualization.html">MySQL 8.0 FAQ: Virtualization Support</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="error-handling.html">Errors, Error Codes, and Common Problems</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="restrictions.html">Restrictions and Limits</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="indexes.html">Indexes</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="glossary.html">MySQL Glossary</a></div></div>                    </li>
        </ul>
                            </nav>
        </div>

        
<a class="docs-sidebar-section" href=""><span class="icon-related"></span>
    <span class="text">Related Documentation</span></a>
<div class="docs-sidebar-accordian open">
    <div class="text">
        <a href="/doc/relnotes/mysql/8.0/en/">MySQL 8.0 Release Notes</a><br />
        <a href="/doc/dev/mysql-server/latest/">MySQL 8.0 Source Code Documentation</a><br />
        </div>
</div>

    <a class="docs-sidebar-section" href=""><span class="icon-download-thin"></span>
        <span class="text">
            Download
                            this Manual
                    </span>
    </a>
    <div class="docs-sidebar-accordian open">
        <div class="text">
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.pdf">PDF (US Ltr)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.a4.pdf">PDF (A4)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-pdf-1-20190611.noarch.rpm">PDF (RPM)</a>
            - 41.5Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.tar.gz">HTML Download (TGZ)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.zip">HTML Download (Zip)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-html-chapter-1-20190611.noarch.rpm">HTML Download (RPM)</a>
            - 9.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.tar.gz">Man Pages (TGZ)</a>
            - 220.4Kb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.zip">Man Pages (Zip)</a>
            - 325.8Kb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.gz">Info (Gzip)</a>
            - 4.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.zip">Info (Zip)</a>
            - 4.1Mb<br />
                    </div>
    </div>

<a class="docs-sidebar-section" href=""><span class="icon-book"></span>
    <span class="text">Excerpts from this Manual</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
                <a href="/doc/mysql-backup-excerpt/8.0/en/">MySQL Backup and Recovery</a><br />
                <a href="/doc/mysql-g11n-excerpt/8.0/en/">MySQL Globalization</a><br />
                <a href="/doc/mysql-infoschema-excerpt/8.0/en/">MySQL Information Schema</a><br />
                <a href="/doc/mysql-installation-excerpt/8.0/en/">MySQL Installation Guide</a><br />
                <a href="/doc/mysql-security-excerpt/8.0/en/">Security in MySQL</a><br />
                <a href="/doc/mysql-startstop-excerpt/8.0/en/">Starting and Stopping MySQL</a><br />
                <a href="/doc/mysql-linuxunix-excerpt/8.0/en/">MySQL and Linux/Unix</a><br />
                <a href="/doc/mysql-windows-excerpt/8.0/en/">MySQL and Windows</a><br />
                <a href="/doc/mysql-osx-excerpt/8.0/en/">MySQL and OS X</a><br />
                <a href="/doc/mysql-solaris-excerpt/8.0/en/">MySQL and Solaris</a><br />
                <a href="/doc/mysql-sourcebuild-excerpt/8.0/en/">Building MySQL from Source</a><br />
                <a href="/doc/mysql-reslimits-excerpt/8.0/en/">MySQL Restrictions and Limitations</a><br />
                <a href="/doc/mysql-partitioning-excerpt/8.0/en/">MySQL Partitioning</a><br />
                <a href="/doc/mysql-secure-deployment-guide/8.0/en/">MySQL Secure Deployment Guide</a><br />
                <a href="/doc/mysql-tutorial-excerpt/8.0/en/">MySQL Tutorial</a><br />
                <a href="/doc/mysql-perfschema-excerpt/8.0/en/">MySQL Performance Schema</a><br />
                <a href="/doc/mysql-replication-excerpt/8.0/en/">MySQL Replication</a><br />
                <a href="/doc/mysql-repo-excerpt/8.0/en/">Using the MySQL Yum Repository</a><br />
            </div>
</div>

        <br /><span id="wkr"><br /></span>
    </div>
    </div>

    <div id="docs-main" class="has-toc">
    <div id="docs-main-inner">

                <div class="right" id="docs-version-nav">
            <a href="" id="docs-version-nav-toggle">version 8.0
            <span class="icon-chevron-down"></span></a>
            <div id="docs-version-list">
                                                                                            <a                         href="/doc/refman/5.7/en/faqs-triggers.html">
                        5.7
                                            </a><br />
                                                                            <a                         href="/doc/refman/5.6/en/faqs-triggers.html">
                        5.6
                                            </a><br />
                                                                            <a                         href="/doc/refman/5.5/en/faqs-triggers.html">
                        5.5
                                            </a><br />
                                                                        <div id="docs-version-nav-lang">
                                                                                                                                                    <a                                     href="/doc/refman/5.6/ja/faqs-triggers.html">
                                    5.6&nbsp;
                                                                            Japanese
                                                                    </a><br />
                                                                                            </div>
                            </div>
        </div>
        
        <div id="docs-show-nav" class="left hidden" style="margin-right: 15px;">
            <a class="docs-show-hide-nav" href="" aria-label="Show Sidebar"
                title="Show Sidebar"><span class="icon-arrow-small-right"></span></a>
        </div>

                        <div id="docs-breadcrumbs">
            <a href="/doc/refman/8.0/en/">MySQL 8.0 Reference Manual</a> &nbsp;/&nbsp;
                                                        <a href="faqs.html">MySQL 8.0 Frequently Asked Questions</a> &nbsp;/&nbsp;
                                                                                    MySQL 8.0 FAQ: Triggers
                                    </div>
        
        <div id="docs-body">
        
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a name="faqs-triggers"></a>A.5 MySQL 8.0 FAQ: Triggers</h2>

</div>

</div>

</div>
<div class="qandaset">
<a name="idm139663048270544"></a><dl><dt>A.5.1. <a href="faqs-triggers.html#faq-mysql-where-triggers-docs">
        Where can I find the documentation for MySQL 8.0
        triggers?
      </a></dt><dt>A.5.2. <a href="faqs-triggers.html#faq-mysql-where-triggers-forum">
        Is there a discussion forum for MySQL Triggers?
      </a></dt><dt>A.5.3. <a href="faqs-triggers.html#faq-mysql-have-trigger-levels">
        Does MySQL 8.0 have statement-level or row-level
        triggers?
      </a></dt><dt>A.5.4. <a href="faqs-triggers.html#faq-mysql-have-trigger-defaults">
        Are there any default triggers?
      </a></dt><dt>A.5.5. <a href="faqs-triggers.html#faq-mysql-how-triggers-managed">
        How are triggers managed in MySQL?
      </a></dt><dt>A.5.6. <a href="faqs-triggers.html#faq-mysql-can-view-all-triggers">
        Is there a way to view all triggers in a given database?
      </a></dt><dt>A.5.7. <a href="faqs-triggers.html#faq-mysql-how-triggers-stored">
        Where are triggers stored?
      </a></dt><dt>A.5.8. <a href="faqs-triggers.html#faq-mysql-can-trigger-procedure">
        Can a trigger call a stored procedure?
      </a></dt><dt>A.5.9. <a href="faqs-triggers.html#faq-mysql-can-triggers-tables">
        Can triggers access tables?
      </a></dt><dt>A.5.10. <a href="faqs-triggers.html#faq-mysql-can-triggers-same-events">
        Can a table have multiple triggers with the same trigger event
        and action time?
      </a></dt><dt>A.5.11. <a href="faqs-triggers.html#faq-mysql-can-triggers-udf">
        Can triggers call an external application through a UDF?
      </a></dt><dt>A.5.12. <a href="faqs-triggers.html#faq-mysql-can-triggers-remote">
        Is it possible for a trigger to update tables on a remote
        server?
      </a></dt><dt>A.5.13. <a href="faqs-triggers.html#faq-mysql-can-triggers-replication">
        Do triggers work with replication?
      </a></dt><dt>A.5.14. <a href="faqs-triggers.html#faq-mysql-how-triggers-master-slave">
        How are actions carried out through triggers on a master
        replicated to a slave?
      </a></dt></dl><table border="0" style="width: 100%;"><colgroup><col align="left" width="1%"><col></colgroup><tbody><tr class="question"><td align="left" valign="top"><a name="faq-mysql-where-triggers-docs"></a><a name="idm139663048269792"></a><p><b>A.5.1.</b></p></td><td align="left" valign="top"><p>
        Where can I find the documentation for MySQL 8.0
        triggers?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        See <a class="xref" href="triggers.html" title="24.3 Using Triggers">Section 24.3, “Using Triggers”</a>.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-where-triggers-forum"></a><a name="idm139663048267136"></a><p><b>A.5.2.</b></p></td><td align="left" valign="top"><p>
        Is there a discussion forum for MySQL Triggers?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        Yes. It is available at <a class="ulink" href="https://forums.mysql.com/list.php?99" target="_top">https://forums.mysql.com/list.php?99</a>.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-have-trigger-levels"></a><a name="idm139663048264576"></a><p><b>A.5.3.</b></p></td><td align="left" valign="top"><p>
        Does MySQL 8.0 have statement-level or row-level
        triggers?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        In MySQL 8.0, all triggers are <code class="literal">FOR EACH
        ROW</code>; that is, the trigger is activated for each row
        that is inserted, updated, or deleted. MySQL 8.0
        does not support triggers using <code class="literal">FOR EACH
        STATEMENT</code>.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-have-trigger-defaults"></a><a name="idm139663048260912"></a><p><b>A.5.4.</b></p></td><td align="left" valign="top"><p>
        Are there any default triggers?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        Not explicitly. MySQL does have specific special behavior for
        some <a class="link" href="datetime.html" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> columns, as well
        as for columns which are defined using
        <code class="literal">AUTO_INCREMENT</code>.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-how-triggers-managed"></a><a name="idm139663048256816"></a><p><b>A.5.5.</b></p></td><td align="left" valign="top"><p>
        How are triggers managed in MySQL?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        In MySQL 8.0, triggers can be created using the
        <a class="link" href="create-trigger.html" title="13.1.22 CREATE TRIGGER Syntax"><code class="literal">CREATE TRIGGER</code></a> statement, and
        dropped using <a class="link" href="drop-trigger.html" title="13.1.34 DROP TRIGGER Syntax"><code class="literal">DROP TRIGGER</code></a>. See
        <a class="xref" href="create-trigger.html" title="13.1.22 CREATE TRIGGER Syntax">Section 13.1.22, “CREATE TRIGGER Syntax”</a>, and
        <a class="xref" href="drop-trigger.html" title="13.1.34 DROP TRIGGER Syntax">Section 13.1.34, “DROP TRIGGER Syntax”</a>, for more about these statements.
      </p><p>
        Information about triggers can be obtained by querying the
        <a class="link" href="triggers-table.html" title="25.34 The INFORMATION_SCHEMA TRIGGERS Table"><code class="literal">INFORMATION_SCHEMA.TRIGGERS</code></a> table.
        See <a class="xref" href="triggers-table.html" title="25.34 The INFORMATION_SCHEMA TRIGGERS Table">Section 25.34, “The INFORMATION_SCHEMA TRIGGERS Table”</a>.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-can-view-all-triggers"></a><a name="idm139663048248560"></a><p><b>A.5.6.</b></p></td><td align="left" valign="top"><p>
        Is there a way to view all triggers in a given database?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        Yes. You can obtain a listing of all triggers defined on
        database <code class="literal">dbname</code> using a query on the
        <a class="link" href="triggers-table.html" title="25.34 The INFORMATION_SCHEMA TRIGGERS Table"><code class="literal">INFORMATION_SCHEMA.TRIGGERS</code></a> table
        such as the one shown here:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">SELECT TRIGGER_NAME, EVENT_MANIPULATION, EVENT_OBJECT_TABLE, ACTION_STATEMENT
    FROM INFORMATION_SCHEMA.TRIGGERS
    WHERE TRIGGER_SCHEMA='<em class="replaceable">dbname</em>';</code></pre><p>
        For more information about this table, see
        <a class="xref" href="triggers-table.html" title="25.34 The INFORMATION_SCHEMA TRIGGERS Table">Section 25.34, “The INFORMATION_SCHEMA TRIGGERS Table”</a>.
      </p><p>
        You can also use the <a class="link" href="show-triggers.html" title="13.7.6.38 SHOW TRIGGERS Syntax"><code class="literal">SHOW
        TRIGGERS</code></a> statement, which is specific to MySQL. See
        <a class="xref" href="show-triggers.html" title="13.7.6.38 SHOW TRIGGERS Syntax">Section 13.7.6.38, “SHOW TRIGGERS Syntax”</a>.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-how-triggers-stored"></a><a name="idm139663048239520"></a><p><b>A.5.7.</b></p></td><td align="left" valign="top"><p>
        Where are triggers stored?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        Triggers are stored in the <code class="literal">mysql.triggers</code>
        system table, which is part of the data dictionary.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-can-trigger-procedure"></a><a name="idm139663048236720"></a><p><b>A.5.8.</b></p></td><td align="left" valign="top"><p>
        Can a trigger call a stored procedure?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        Yes.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-can-triggers-tables"></a><a name="idm139663048234704"></a><p><b>A.5.9.</b></p></td><td align="left" valign="top"><p>
        Can triggers access tables?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        A trigger can access both old and new data in its own table. A
        trigger can also affect other tables, but it is not permitted to
        modify a table that is already being used (for reading or
        writing) by the statement that invoked the function or trigger.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-can-triggers-same-events"></a><a name="idm139663048232480"></a><p><b>A.5.10.</b></p></td><td align="left" valign="top"><p>
        Can a table have multiple triggers with the same trigger event
        and action time?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        In MySQL 8.0, it is possible to define multiple
        triggers for a given table that have the same trigger event and
        action time. For example, you can have two <code class="literal">BEFORE
        UPDATE</code> triggers for a table. By default, triggers that
        have the same trigger event and action time activate in the
        order they were created. To affect trigger order, specify a
        clause after <code class="literal">FOR EACH ROW</code> that indicates
        <code class="literal">FOLLOWS</code> or <code class="literal">PRECEDES</code> and
        the name of an existing trigger that also has the same trigger
        event and action time. With <code class="literal">FOLLOWS</code>, the new
        trigger activates after the existing trigger. With
        <code class="literal">PRECEDES</code>, the new trigger activates before
        the existing trigger.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-can-triggers-udf"></a><a name="idm139663048225584"></a><p><b>A.5.11.</b></p></td><td align="left" valign="top"><p>
        Can triggers call an external application through a UDF?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        Yes. For example, a trigger could invoke the
        <code class="literal">sys_exec()</code> UDF.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-can-triggers-remote"></a><a name="idm139663048222768"></a><p><b>A.5.12.</b></p></td><td align="left" valign="top"><p>
        Is it possible for a trigger to update tables on a remote
        server?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        Yes. A table on a remote server could be updated using the
        <code class="literal">FEDERATED</code> storage engine. (See
        <a class="xref" href="federated-storage-engine.html" title="16.8 The FEDERATED Storage Engine">Section 16.8, “The FEDERATED Storage Engine”</a>).
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-can-triggers-replication"></a><a name="idm139663048219200"></a><p><b>A.5.13.</b></p></td><td align="left" valign="top"><p>
        Do triggers work with replication?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        Yes. However, the way in which they work depends whether you are
        using MySQL's <span class="quote">“<span class="quote">classic</span>”</span> statement-based or
        row-based replication format.
      </p><p>
        When using statement-based replication, triggers on the slave
        are executed by statements that are executed on the master (and
        replicated to the slave).
      </p><p>
        When using row-based replication, triggers are not executed on
        the slave due to statements that were run on the master and then
        replicated to the slave. Instead, when using row-based
        replication, the changes caused by executing the trigger on the
        master are applied on the slave.
      </p><p>
        For more information, see
        <a class="xref" href="replication-features-triggers.html" title="17.4.1.35 Replication and Triggers">Section 17.4.1.35, “Replication and Triggers”</a>.
      </p></td></tr><tr class="question"><td align="left" valign="top"><a name="faq-mysql-how-triggers-master-slave"></a><a name="idm139663048214160"></a><p><b>A.5.14.</b></p></td><td align="left" valign="top"><p>
        How are actions carried out through triggers on a master
        replicated to a slave?
      </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
        Again, this depends on whether you are using statement-based or
        row-based replication.
      </p><p><b>Statement-based replication. </b>
          First, the triggers that exist on a master must be re-created
          on the slave server. Once this is done, the replication flow
          works as any other standard DML statement that participates in
          replication. For example, consider a table
          <code class="literal">EMP</code> that has an <code class="literal">AFTER</code>
          insert trigger, which exists on a master MySQL server. The
          same <code class="literal">EMP</code> table and <code class="literal">AFTER</code>
          insert trigger exist on the slave server as well. The
          replication flow would be:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1"><li class="listitem"><p>
            An <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statement is made
            to <code class="literal">EMP</code>.
          </p></li><li class="listitem"><p>
            The <code class="literal">AFTER</code> trigger on
            <code class="literal">EMP</code> activates.
          </p></li><li class="listitem"><p>
            The <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statement is
            written to the binary log.
          </p></li><li class="listitem"><p>
            The replication slave picks up the
            <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statement to
            <code class="literal">EMP</code> and executes it.
          </p></li><li class="listitem"><p>
            The <code class="literal">AFTER</code> trigger on
            <code class="literal">EMP</code> that exists on the slave activates.
</p></li></ol>
</div>
<p><b>Row-based replication. </b>
          When you use row-based replication, the changes caused by
          executing the trigger on the master are applied on the slave.
          However, the triggers themselves are not actually executed on
          the slave under row-based replication. This is because, if
          both the master and the slave applied the changes from the
          master and, in addition, the trigger causing these changes
          were applied on the slave, the changes would in effect be
          applied twice on the slave, leading to different data on the
          master and the slave.
        </p><p>
        In most cases, the outcome is the same for both row-based and
        statement-based replication. However, if you use different
        triggers on the master and slave, you cannot use row-based
        replication. (This is because the row-based format replicates
        the changes made by triggers executing on the master to the
        slaves, rather than the statements that caused the triggers to
        execute, and the corresponding triggers on the slave are not
        executed.) Instead, any statements causing such triggers to be
        executed must be replicated using statement-based replication.
      </p><p>
        For more information, see
        <a class="xref" href="replication-features-triggers.html" title="17.4.1.35 Replication and Triggers">Section 17.4.1.35, “Replication and Triggers”</a>.
</p></td></tr></tbody></table>
</div>

</div>
<br />
        </div>

                <div id="docs-in-page-nav-container">
            <div id="docs-in-page-nav">
                
    <a href="faqs-stored-procs.html"
        aria-label="Previous" title="Previous: MySQL 8.0 FAQ: Stored Procedures and Functions"><span
        class="icon-chevron-left"></span> PREV</a> &nbsp;
<a href="index.html" aria-label="Start" title="Start"> HOME</a> &nbsp;
        <a aria-label="Up" href="faqs.html" title="Up: MySQL 8.0 Frequently Asked Questions"> UP</a> &nbsp;
    <a href="faqs-views.html" aria-label="Next"
        title="Next: MySQL 8.0 FAQ: Views">NEXT <span
        class="icon-chevron-right"></span></a>
            </div>
        </div>
        
         <div id="docs-body-extra">
             
<a class="docs-sidebar-section" href=""><span class="icon-related"></span>
    <span class="text">Related Documentation</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
        <a href="/doc/relnotes/mysql/8.0/en/">MySQL 8.0 Release Notes</a><br />
        <a href="/doc/dev/mysql-server/latest/">MySQL 8.0 Source Code Documentation</a><br />
        </div>
</div>

    <a class="docs-sidebar-section" href=""><span class="icon-download-thin"></span>
        <span class="text">
            Download
                            this Manual
                    </span>
    </a>
    <div class="docs-sidebar-accordian">
        <div class="text">
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.pdf">PDF (US Ltr)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.a4.pdf">PDF (A4)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-pdf-1-20190611.noarch.rpm">PDF (RPM)</a>
            - 41.5Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.tar.gz">HTML Download (TGZ)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.zip">HTML Download (Zip)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-html-chapter-1-20190611.noarch.rpm">HTML Download (RPM)</a>
            - 9.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.tar.gz">Man Pages (TGZ)</a>
            - 220.4Kb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.zip">Man Pages (Zip)</a>
            - 325.8Kb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.gz">Info (Gzip)</a>
            - 4.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.zip">Info (Zip)</a>
            - 4.1Mb<br />
                    </div>
    </div>

<a class="docs-sidebar-section" href=""><span class="icon-book"></span>
    <span class="text">Excerpts from this Manual</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
                <a href="/doc/mysql-backup-excerpt/8.0/en/">MySQL Backup and Recovery</a><br />
                <a href="/doc/mysql-g11n-excerpt/8.0/en/">MySQL Globalization</a><br />
                <a href="/doc/mysql-infoschema-excerpt/8.0/en/">MySQL Information Schema</a><br />
                <a href="/doc/mysql-installation-excerpt/8.0/en/">MySQL Installation Guide</a><br />
                <a href="/doc/mysql-security-excerpt/8.0/en/">Security in MySQL</a><br />
                <a href="/doc/mysql-startstop-excerpt/8.0/en/">Starting and Stopping MySQL</a><br />
                <a href="/doc/mysql-linuxunix-excerpt/8.0/en/">MySQL and Linux/Unix</a><br />
                <a href="/doc/mysql-windows-excerpt/8.0/en/">MySQL and Windows</a><br />
                <a href="/doc/mysql-osx-excerpt/8.0/en/">MySQL and OS X</a><br />
                <a href="/doc/mysql-solaris-excerpt/8.0/en/">MySQL and Solaris</a><br />
                <a href="/doc/mysql-sourcebuild-excerpt/8.0/en/">Building MySQL from Source</a><br />
                <a href="/doc/mysql-reslimits-excerpt/8.0/en/">MySQL Restrictions and Limitations</a><br />
                <a href="/doc/mysql-partitioning-excerpt/8.0/en/">MySQL Partitioning</a><br />
                <a href="/doc/mysql-secure-deployment-guide/8.0/en/">MySQL Secure Deployment Guide</a><br />
                <a href="/doc/mysql-tutorial-excerpt/8.0/en/">MySQL Tutorial</a><br />
                <a href="/doc/mysql-perfschema-excerpt/8.0/en/">MySQL Performance Schema</a><br />
                <a href="/doc/mysql-replication-excerpt/8.0/en/">MySQL Replication</a><br />
                <a href="/doc/mysql-repo-excerpt/8.0/en/">Using the MySQL Yum Repository</a><br />
            </div>
</div>
         </div>

              </div>
     </div>

</div>

<script>
$(function() {
    var doc = new $.doc({ 'mobile': $.browser.mobile, 'docId': 1, 'highlight': true });
});
</script>
    

            
        </div>
    </div>

    <footer class="collapsed">
        <div id="footer-bottom">
                                    <div id="footer-collapse">
                <a href="" id="expand-footer"
                    aria-label="Expand Footer"
                    title="Expand Footer"><span
                    class="icon-plus-square"></span></a>
            </div>
                        <div class="footer-contact">
                <div id="footer-contact-icon" style="display: none;">
                    <span class="icon-call-phone"></span>
                </div>
                <div id="footer-contact-numbers" style="display: none;">
                    <strong>Contact MySQL Sales</strong><br/>
                    USA/Canada: +1-866-221-0634 &nbsp;
                    (<a href="https://www.mysql.com/about/contact/phone/">More Countries &raquo;</a>)
                </div>
                <div id="footer-contact-copyright" style="display: inline-block;">
                    <a href="http://www.oracle.com/" aria-label="Oracle" title="Oracle"><span class="oracle-logo"></span></a>
                    &nbsp; &copy; 2019, Oracle Corporation and/or its affiliates
                </div>
            </div>
            <div class="social-icons">
                <a aria-label="Join us on Facebook" title="Join us on Facebook" href="http://www.facebook.com/mysql"><span class="icon-facebook-square"></span></a>
                <a aria-label="Follow us on Twitter" title="Follow us on Twitter" href="https://twitter.com/mysql"><span class="icon-twitter-square"></span></a>
                <a aria-label="Follow us on LinkedIn" title="Follow us on LinkedIn" href="https://www.linkedin.com/company/mysql"><span class="icon-linkedin-square"></span></a>
                <a aria-label="Visit our YouTube channel" title="Visit our YouTube channel" href="http://www.youtube.com/mysqlchannel"><span class="icon-youtube-square"></span></a>
            </div>
            <br class="clear" />
        </div>
        <div id="footer-links">

            <div id="footer-nav"></div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/products/">Products</a></li>
                    <li><a href="https://www.mysql.com/cloud/">Oracle MySQL Cloud Service</a></li>
                    <li><a href="https://www.mysql.com/products/enterprise/">MySQL Enterprise Edition</a></li>
                    <li><a href="https://www.mysql.com/products/standard/">MySQL Standard Edition</a></li>
                    <li><a href="https://www.mysql.com/products/classic/">MySQL Classic Edition</a></li>
                    <li><a href="https://www.mysql.com/products/cluster/">MySQL Cluster CGE</a></li>
                    <li><a href="https://www.mysql.com/oem/">MySQL Embedded (OEM/ISV)</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/services/">Services</a></li>
                    <li><a href="https://www.mysql.com/training/">Training</a></li>
                    <li><a href="https://www.mysql.com/certification/">Certification</a></li>
                    <li><a href="https://www.mysql.com/consulting/">Consulting</a></li>
                    <li><a href="https://www.mysql.com/support/">Support</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://dev.mysql.com/downloads/">Downloads</a></li>
                    <li><a href="https://dev.mysql.com/downloads/mysql/">MySQL Community Server</a></li>
                    <li><a href="https://dev.mysql.com/downloads/cluster/">MySQL NDB Cluster</a></li>
                    <li><a href="https://dev.mysql.com/downloads/shell/">MySQL Shell</a></li>
                    <li><a href="https://dev.mysql.com/downloads/router/">MySQL Router</a></li>
                    <li><a href="https://dev.mysql.com/downloads/workbench/">MySQL Workbench</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://dev.mysql.com/doc/">Documentation</a></li>
                    <li><a href="https://dev.mysql.com/doc/refman/en/">MySQL Reference Manual</a></li>
                    <li><a href="https://dev.mysql.com/doc/workbench/en/">MySQL Workbench</a></li>
                    <li><a href="https://dev.mysql.com/doc/index-cluster.html">MySQL NDB Cluster</a></li>
                    <li><a href="https://dev.mysql.com/doc/index-connectors.html">MySQL Connectors</a></li>
                    <li><a href="https://dev.mysql.com/doc/#topic">Topic Guides</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/about/">About MySQL</a></li>
                    <li><a href="https://www.mysql.com/about/contact/">Contact Us</a></li>
                                                            <li><a href="https://www.mysql.com/buy-mysql/">How to Buy</a></li>
                    <li><a href="https://www.mysql.com/partners/">Partners</a></li>
                    <li><a href="https://www.mysql.com/about/jobs/">Job Opportunities</a></li>
                    <li><a href="https://www.mysql.com/sitemap.html">Site Map</a></li>
                </ul>
            </div>

            
            <div id="footer-logo">
                <a href="http://www.oracle.com/" aria-label="Oracle" title="Oracle"><span class="oracle-logo"></span></a>
                &nbsp; &copy; 2019, Oracle Corporation and/or its affiliates
                <div class="footer-legal-links">
                    <a href="https://www.mysql.com/about/legal/">Legal Policies</a> |
                    <a href="http://www.oracle.com/us/legal/privacy/index.htm">Your Privacy Rights</a> |
                    <a href="http://www.oracle.com/us/legal/terms/index.html">Terms of Use</a> |
                    <a href="http://www.oracle.com/us/legal/third-party-trademarks/index.html">Trademark Policy</a> |
                    <a href="http://www.oracle.com/technetwork/community/oca-486395.html">Contributor Agreement</a> |
                    <div id="teconsent" style="display: inline-block"><script async="async" type="text/javascript" src="js/notice.js" crossorigin=""></script></div>
                </div>
            </div>

        </div>
    </footer>
</div>

        <script src="js/s_code_remote.js"></script>

        
    
</body>
</html>
